Manjaro 安装 LNMP环境 https://www.zybuluo.com/corerman/note/484297
1.1 创建用户 及 用户组
sudo groupadd -r www
sudo useradd -s /sbin/nologin -g www -r www
1.2 下载Nginx源码包 并 解压
wget http://nginx.org/download/nginx-1.14.0.tar.gz
| if (-f $request_filename/index.html){ | |
| rewrite (.*) $1/index.html break; | |
| } | |
| if (-f $request_filename/index.php){ | |
| rewrite (.*) $1/index.php; | |
| } | |
| if (!-f $request_filename){ | |
| rewrite (.*) /index.php; | |
| } |
| #include <stdio.h> | |
| int main(){ | |
| int numlist[100],len=0,num=0; | |
| while(scanf("%d",&num)!=EOF){ | |
| numlist[len]=num; | |
| len++; | |
| } | |
| int tempnum=0; |
1.1 创建用户 及 用户组
sudo groupadd -r www
sudo useradd -s /sbin/nologin -g www -r www
1.2 下载Nginx源码包 并 解压
wget http://nginx.org/download/nginx-1.14.0.tar.gz
| 0. 安装 | |
| # 启动时选择第二项boot(non-free),Manjaro自带的驱动精灵会帮你安装好所需驱动,笔记本双显卡则会帮你安装bumblebee | |
| driver boot(non-free) | |
| 如果是WIndows+Manjaro双系统安装, | |
| 步骤可以参考:https://my.oschina.net/langxSpirit/blog/1633384 | |
| # 1. First of all of course get Manjaro: | |
| https://manjaro.org/get-manjaro/ | |
| # I recommend using Etcher to copy the image to your USB: | |
| https://etcher.io/ | |
| # 2. Before installing make sure: | |
| # - Secure boot is disabled in BIOS | |
| # - Your SSD, HDD or NVME drive is set to AHCI instead of RAID | |
| # - Fastboot should be on Auto or minimal, but this shouldn't matter to much |
| pacman -S mariadb | |
| mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql //注意这个datadir,很重要,按照默认操作 | |
| systemctl enable mysqld | |
| systemctl start mysqld | |
| mysql_secure_installation |
| archlinux/manjaro 开机自启动[linux] | |
| 在/usr/lib/systemd/system/中加入frp.service文件 | |
| [Unit] | |
| Description=AutoExec | |
| [Service] | |
| ExecStart=/root/frp.sh | |
| [Install] | |
| WantedBy=multi-user.target |
| git config --global http.postBuffer 524288000 | |
| 这是个很有效的配置,修改后速度有质的提升 |
| chmod +x /etc/rc.local | |
| add command before "exit 0" |
| A user can edit its cron table with crontab -e. | |
| An example which will run /path/to/script.sh at startup: | |
| @reboot /path/to/script.sh | |
| If you need to run it as root, don't use @reboot sudo /path/to/script.sh; | |
| use sudo crontab -eu root to edit root's crontab. |