安装nginx
yum -y install gcc
yum -y install gcc-c++
yum -y install zlib zlib-devel openssl openssl--devel pcre pcre-devel
yum install GeoIP gd libXpm libxslt
到页面http://nginx.org/en/download.html找到最新版本nginx
wget nginx的地址
tar -zxvf ........
./configure
make
make install
进入/usr/local/nginx,这里是安装后的nginx
启动nginx
nginx -s reload|reopen|stop|quit
#重新加载配置|重启|停止|退出 nginx
nginx配置
/usr/local/nginx/conf
工作目录
/usr/share/nginx/html/info.php
访问ip,看是否已经安装成功
image.png安装mysql
yum install mariadb-server mariadb
配置文件
/etc/my.cnf
mariadb数据库的相关命令是:
systemctl start mariadb
#启动MariaDB
systemctl stop mariadb
#停止MariaDB
systemctl restart mariadb
#重启MariaDB
systemctl enable mariadb
#设置开机启动
mysql -u root -p
初次安装root没有密码
安装php-fpm php
yum install php php-fpm
启动systemctl start php-fpm
安装php+mysql扩展
yum install mariadh mariadb-server
yum install php-gd php-mysql php-mbstring php-xml php-mcrypt php-imap php-odbc php-pear php -xmlrpc
nginx+php
image.png
网友评论