购买服务器和域名

域名:www.namesilo.com 服务器:www.vultr.com www.bandwagonhost.com

新手建立个人网站第一步(服务器,域名购买解析)

域名解析

如何在namesilo为域名添加解析

登录服务器配置

两个软件:winscp, putty

下载wordpress安装环境XAMPP

wget https://www.apachefriends.org/xampp-files/7.2.34/xampp-linux-x64-7.2.34-0-installer.run
chmod 755 xampp-linux-x64-7.2.34-0-installer.run
sudo ./xampp-linux-x64-7.4.11-0-installer.run
sudo /opt/lampp/lampp start

首次运行出现“xampp is currently only availably as 32 bit application please use a 32 bit compatibility library for your system”报错

安装库

yum install -y glibc*i686

注释掉下面语句

sudo vi /opt/lampp/lampp

#case `uname -m` in
#   *_64)
#   if /opt/lampp/bin/php -v > /dev/null 2>&1
#   then
#       :
#   else
#       $de && echo "XAMPP gibt es zur Zeit nur als 32-Bit Applikation. Bitte verwende eine 32-Bit Kompatibilitaetsbibliothek fuer Dein System."
#       $de || echo "XAMPP is currently only availably as 32 bit application. Please use a 32 bit compatibility library for your system."
#       exit
#   fi
#   ;;
#esac

重启

sudo /opt/lampp/lampp start
sudo /opt/lampp/lampp restart

更改后依旧报错

XAMPP: Starting Apache...fail.

    httpd: Syntax error on line 522 of /opt/lampp/etc/httpd.conf: Syntax error on line 10 of

    /opt/lampp/etc/extra/httpd-xampp.conf: Cannot load /opt/lampp/modules/libphp7.so into

    server: libnsl.so.1: cannot open shared object file: No such file or directory

安装后重启服务

yum install libnsl.x86_64 

为wordpress创建数据库

sudo /opt/lampp/lampp startmysql
/opt/lampp/bin/mysql -u root
#mysql
create database wordpress;
CREATE USER 'username'@'localhost' IDENTIFIED BY 'password';
GRANT ALL ON *.* TO 'username'@'localhost';

更改主机名

vim /opt/lampp/etc/httpd.conf
ServerName ip:80

wordpress安装主题插件需要ftp服务

sudo yum instal vsftpd
sudo service vsftpd start

如果报错:

Job for vsftpd.service failed because the control process exited with error code. See "systemctl status vsftpd.service" and "journalctl -xe" for details

方法:

vim /etc/vsftpd/vsftpd.conf

listen=YES
listen_ipv6=NO

查看是否有其他程序占用了FTP端口
列出端口为21
lsof -i:21
kill -9 PID号

访问 http://yourip 就可以打开你的bolg了。

Categories: Python

0 Comments

Leave a Reply

Your email address will not be published.