免责声明

易百易数码科技

appserv服务器配置_服务器配置

文章目录


配置AppServ服务器,需安装Apache、PHP和MySQL,设置虚拟主机,确保服务正常运行。

服务器环境准备

1、操作系统:推荐使用Linux系统,如CentOS、Ubuntu等。

2、安装软件:需要安装Apache、MySQL、PHP等软件。

appserv服务器配置_服务器配置-图1

安装Apache

1、更新系统软件包:

sudo yum update

2、安装Apache:

sudo yum install httpd

3、启动Apache服务:

sudo systemctl start httpd

4、设置Apache开机自启:

sudo systemctl enable httpd

5、查看Apache状态:

sudo systemctl status httpd

安装MySQL

1、下载MySQL安装包:

wget https://dev.mysql.com/get/mysql80communityreleaseel73.noarch.rpm

2、安装MySQL安装包:

appserv服务器配置_服务器配置-图2
sudo yum localinstall mysql80communityreleaseel73.noarch.rpm

3、安装MySQL:

sudo yum install mysqlcommunityserver

4、启动MySQL服务:

sudo systemctl start mysqld

5、设置MySQL开机自启:

sudo systemctl enable mysqld

6、查看MySQL状态:

sudo systemctl status mysqld

7、获取临时密码:

sudo grep 'temporary password' /var/log/mysqld.log

8、修改MySQL密码:

mysql u root p skippassword
ALTER USER 'root'@'localhost' IDENTIFIED BY '新密码';

9、创建AppServ数据库和用户:

appserv服务器配置_服务器配置-图3
CREATE DATABASE appserv;
CREATE USER 'appserv'@'localhost' IDENTIFIED BY 'appserv_password';
GRANT ALL PRIVILEGES ON appserv.* TO 'appserv'@'localhost';
FLUSH PRIVILEGES;

10、导入AppServ数据库结构:

cd /usr/local/appserv/sql/mysql/appserv_create.sql; mysql u root p appserv < appserv_create.sql; cd ;

11、重启MySQL服务:

sudo systemctl restart mysqld

安装PHP及其扩展库

1、安装PHP:

sudo yum install php phpmysqlnd phpfpm phpgd phpmbstring phpxml phppear phpzip phpbcmath phpsoap curl curldevel libcurl3 libcurl3devel openssl openssldevel zlib zlibdevel pcre pcredevel gd gddevel freetype freetypedevel libjpeg libjpegdevel libpng libpngdevel libxml2 libxml2devel libxslt libxsltdevel libzip libzipdevel mcrypt mcryptdevel mhash mhashdevel readline readlinedevel tidy tidyhtml5 tidyhtml5devel gettext gettextdevel domxml domxmlsimplexml domxmldom domxmlxpath xsl xsltc xsltc_saxon xsltc_saxondevel recode recodeutf8 recodeutf8perl wget wgetdevel ncurses ncursesdevel e2fsprogs e2fsprogsdevel krb5 krb5devel libidn libidn2 libidn2devel openldap openldapclients openldapdevel mod_ssl mod_perl mod_perldevel mod_auth_basic mod_authn_file mod_authz_default mod_authz_groupfile mod_authz_host mod_authz_user mod_dbd mod_dnssd mod_dumpio mod_expires mod_ext_filter mod_filter mod_headers mod_include mod_info mod_log_config mod_mime mod_negotiation mod_rewrite mod_setenvif mod_socache_shmcb mod_socache_shmc mod_status mod_suexec mod_unique_id mod_vhost_alias unixODBC unixODBCdevel curl curldevel libcurl3 libcurl3devel openssl openssldevel zlib zlibdevel pcre pcredevel gd gddevel freetype freetypedevel libjpeg libjpegdevel libpng libpngdevel libxml2 libxml2devel libxslt libxsltdevel libzip libzipdevel mcrypt mcryptdevel mhash mhashdevel readline readlinedevel tidy tidyhtml5 tidyhtml5devel gettext gettextdevel domxml domxmlsimplexml domxmldom domxmlxpath xsl xsltc xsltc_saxon xsltc_saxondevel recode recodeutf8 recodeutf8perl wget wgetdevel ncurses ncursesdevel e2fsprogs e2fsprogsdevel krb5 krb5devel libidn libidn2 libidn2devel openldap openldapclients openldapdevel mod_ssl mod_perl mod_perldevel mod_auth_basic mod_authn_file mod_authz_default mod_authz_groupfile mod_authz_host mod_authz_user mod_dbd mod_dnssd mod_dumpio mod_expires mod_ext_filter mod_filter mod_headers mod_include mod_info mod_log_config mod_mime mod_negotiation mod_rewrite mod_setenvif mod_socache_shmcb mod_socache_shmc mod_status mod_suexec mod_unique_id mod_vhost_alias unixODBC unixODBCdevel curl curl
分享:
扫描分享到社交APP
上一篇
下一篇