linux下安装wordpress用apache还是Nginx好
1个回答
展开全部
lanmp的环境集成软件有wdcp,这款有后台管理界面可以使用比较直观wdcp后台--》站点添加下绑定域名--》添加mysql账户--》添加ftp账户--》本地ftp软件添加刚刚的ftp账户上传WordPress站点资料--》域名解析到服务器的ip上--》解析生效后访问安装;
ssh远程到Linux命令行添加(都是yum安装方式)
mkdir /var/www/html/test.com
chown apache:apache /var/www/html/test.com
echo "NameVirtualHost *:80">>/etc/httpd/conf/httpd.conf
sed -i 's/AllowOverride None/AllowOverride ALL/g' /etc/httpd/conf/httpd.conf
vi /etc/httpd/conf/httpd.conf 尾部添加
<VirtualHost *:80>
ServerAdmin webmaster@dummy-host.example.com
DocumentRoot /var/www/html/test.com
ServerName test.com
ErrorLog logs/test.com-error_log
CustomLog logs/test.com-access_log common
</VirtualHost>
/etc/init.d/httpd restart
创建数据库
mysql -u root -p
create database testcom;
grant all privileges on testcom.* to 'testcom'@'localhost' identified by 'testcomD';
flush privileges;
quit
然后上传WordPress到/var/www/html/test.com
域名解析生效后访问安装。
ssh远程到Linux命令行添加(都是yum安装方式)
mkdir /var/www/html/test.com
chown apache:apache /var/www/html/test.com
echo "NameVirtualHost *:80">>/etc/httpd/conf/httpd.conf
sed -i 's/AllowOverride None/AllowOverride ALL/g' /etc/httpd/conf/httpd.conf
vi /etc/httpd/conf/httpd.conf 尾部添加
<VirtualHost *:80>
ServerAdmin webmaster@dummy-host.example.com
DocumentRoot /var/www/html/test.com
ServerName test.com
ErrorLog logs/test.com-error_log
CustomLog logs/test.com-access_log common
</VirtualHost>
/etc/init.d/httpd restart
创建数据库
mysql -u root -p
create database testcom;
grant all privileges on testcom.* to 'testcom'@'localhost' identified by 'testcomD';
flush privileges;
quit
然后上传WordPress到/var/www/html/test.com
域名解析生效后访问安装。
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询