Typecho博客迁移
1、lnmp安装
wget http://soft.vpser.net/lnmp/lnmp1.7.tar.gz -cO lnmp1.7.tar.gz && tar zxf lnmp1.7.tar.gz && cd lnmp1.7 && ./install.sh lnmp
2、LNMP状态管理命令
LNMP 1.2+状态管理: lnmp {start|stop|reload|restart|kill|status}
LNMP 1.2+各个程序状态管理: lnmp {nginx|mysql|mariadb|php-fpm|pureftpd} {start|stop|reload|restart|kill|status}
LNMP 1.1状态管理: /root/lnmp {start|stop|reload|restart|kill|status}
Nginx状态管理:/etc/init.d/nginx {start|stop|reload|restart}
MySQL状态管理:/etc/init.d/mysql {start|stop|restart|reload|force-reload|status}
Memcached状态管理:/etc/init.d/memcached {start|stop|restart}
PHP-FPM状态管理:/etc/init.d/php-fpm {start|stop|quit|restart|reload|logrotate}
PureFTPd状态管理: /etc/init.d/pureftpd {start|stop|restart|kill|status}
ProFTPd状态管理: /etc/init.d/proftpd {start|stop|restart|reload}
Redis状态管理: /etc/init.d/redis {start|stop|restart|kill}
3、LNMP相关软件安装目录
Nginx 目录: /usr/local/nginx/
MySQL 目录 : /usr/local/mysql/
MySQL数据库所在目录:/usr/local/mysql/var/
MariaDB 目录 : /usr/local/mariadb/
MariaDB数据库所在目录:/usr/local/mariadb/var/
PHP目录 : /usr/local/php/
多PHP版本目录 : /usr/local/php5.5/ 其他版本前面5.5的版本号换成其他即可
PHPMyAdmin目录 : 0.9版本为/home/wwwroot/phpmyadmin/ 1.0及以后版本为 /home/wwwroot/default/phpmyadmin/ 强烈建议将此目录重命名为其不容易猜到的名字。phpmyadmin可自己从官网下载新版替换。
默认网站目录 : 0.9版本为 /home/wwwroot/ 1.0及以后版本为 /home/wwwroot/default/
Nginx日志目录:/home/wwwlogs/
/root/vhost.sh添加的虚拟主机配置文件所在目录:/usr/local/nginx/conf/vhost/
PureFtpd 目录:/usr/local/pureftpd/
PureFtpd web管理目录: 0.9版为/home/wwwroot/default/ftp/ 1.0版为 /home/wwwroot/default/ftp/
Proftpd 目录:/usr/local/proftpd/
Redis 目录:/usr/local/redis/
4、LNMP相关配置文件位置
Nginx主配置(默认虚拟主机)文件:/usr/local/nginx/conf/nginx.conf
添加的虚拟主机配置文件:/usr/local/nginx/conf/vhost/域名.conf
MySQL配置文件:/etc/my.cnf
PHP配置文件:/usr/local/php/etc/php.ini
php-fpm配置文件:/usr/local/php/etc/php-fpm.conf
PureFtpd配置文件:/usr/local/pureftpd/pure-ftpd.conf 1.3及更高版本:/usr/local/pureftpd/etc/pure-ftpd.conf
PureFtpd MySQL配置文件:/usr/local/pureftpd/pureftpd-mysql.conf
Proftpd配置文件:/usr/local/proftpd/etc/proftpd.conf 1.2及之前版本为/usr/local/proftpd/proftpd.conf
Proftpd 用户配置文件:/usr/local/proftpd/etc/vhost/用户名.conf
Redis 配置文件:/usr/local/redis/etc/redis.conf
5、创数据库
create databse typecho;
导入数据:source typecho20200613.sql
暂时不把数据包放上来啦~,
6、上传站点文件到/home/wwwroot
删除原文件夹下的目录,如果无法删除执行如下命令后删除:chattr -i default/.user.ini
暂时不把站点包放上来啦~,
解压该文件wwwroot01.tar.gz
[root@yjscloud wwwroot]# ls a blog default intro www.yjscloud.cn.tar.gz [root@yjscloud wwwroot]# pwd /home/wwwroot
修改配置文件,主要是修改mysql密码
/home/wwwroot/blog/config.inc.php
7、上传vhost配置文件
[root@yjscloud vhost]# pwd
/usr/local/nginx/conf/vhost
[root@yjscloud vhost]# ls
blog.yjscloud.com.conf www.yjscloud.com.conf
[root@yjscloud vhost]#
www.yjscloud.com.conf
如下:
server
{
listen 443 ssl;
#listen [::]:80;
server_name www.yjscloud.com yjscloud.com;
root /home/wwwroot/intro;
index index.html index.htm index.php default.html default.htm default.php;
ssl_certificate 1_www.yjscloud.com_bundle.crt;
ssl_certificate_key 2_www.yjscloud.com.key;
ssl_session_timeout 5m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE;
ssl_prefer_server_ciphers on;
location / {
index index.html index.htm index.php default.html default.htm default.php;
}
include rewrite/typecho.conf;
#error_page 404 /404.html;
# Deny access to PHP files in specific directory
#location ~ /(wp-content|uploads|wp-includes|images)/.*\.php$ { deny all; }
include enable-php-pathinfo.conf;
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
}
location ~ .*\.(js|css)?$
{
expires 12h;
}
location ~ /.well-known {
allow all;
}
location ~ /\.
{
deny all;
}
access_log off;
}
server {
listen 80;
server_name www.yjscloud.com yjscloud.com;
rewrite ^(.*)$ https://$host$1 permanent;
}
blog.yjscloud.com.conf
如下:
server
{
listen 443 ssl;
#listen [::]:80;
server_name blog.yjscloud.com;
root /home/wwwroot/blog;
index index.html index.htm index.php default.html default.htm default.php;
ssl_certificate 1_blog.yjscloud.com_bundle.crt;
ssl_certificate_key 2_blog.yjscloud.com.key;
ssl_session_timeout 5m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE;
ssl_prefer_server_ciphers on;
location / {
index index.html index.htm index.php default.html default.htm default.php;
}
include rewrite/typecho.conf;
#error_page 404 /404.html;
# Deny access to PHP files in specific directory
#location ~ /(wp-content|uploads|wp-includes|images)/.*\.php$ { deny all; }
include enable-php-pathinfo.conf;
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
}
location ~ .*\.(js|css)?$
{
expires 12h;
}
location ~ /.well-known {
allow all;
}
location ~ /\.
{
deny all;
}
access_log off;
}
server {
listen 80;
server_name blog.yjscloud.com;
rewrite ^(.*)$ https://$host$1 permanent;
}
8、上传证书
[root@yjscloud conf]# pwd
/usr/local/nginx/conf
[root@yjscloud conf]# ls
1_blog.yjscloud.com_bundle.crt
1_www.yjscloud.com_bundle.crt
2_blog.yjscloud.com.key
2_www.yjscloud.com.key
[root@yjscloud conf]#
9、重启nginx
/etc/init.d/nginx restart
|| 版权声明
作者:废权
链接:https://blog.yjscloud.com/archives/120
声明:如无特别声明本文即为原创文章仅代表个人观点,版权归《废权的博客》所有,欢迎转载,转载请保留原文链接。
作者:废权
链接:https://blog.yjscloud.com/archives/120
声明:如无特别声明本文即为原创文章仅代表个人观点,版权归《废权的博客》所有,欢迎转载,转载请保留原文链接。
THE END
0
二维码

Typecho博客迁移
1、lnmp安装
wget http://soft.vpser.net/lnmp/lnmp1.7.tar.gz -cO lnmp1.7.tar.gz && tar zxf lnmp1.7.tar.gz && cd lnmp1.7 && ./i……

文章目录
关闭
共有 0 条评论