yum -y update
yum -y install epel-release screen zip unzip git curl wget vim
grubby --update-kernel ALL --args selinux=0
grep '^GRUB_CMDLINE_LINUX=' /etc/default/grub
shutdown -r now
yum -y install fail2ban
systemctl start fail2ban
systemctl enable fail2ban
screen -S cminstall -h 2000000
curl -4sL https://centminmod.com/installer-el8x-82.sh -o installer-el8x-82.sh; bash installer-el8x-82.sh
Install PHP Composer
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php composer-setup.php --install-dir=/usr/bin --filename=composer
php -r "unlink('composer-setup.php');"
-
Check access All Repositories with Read only "Contents"
Will using this token for pull the latest source codes from GitHub.
Setup git credential
git config --global credential.helper store
sudo -u nginx git config --global credential.helper store
vim /etc/centminmod/custom_config.inc
Add three lines:
CF_DNSAPI_GLOBAL='y'
CF_Token="<Your CloudFlare Token>"
CF_Account_ID="<Your CloudFlare Account Id"
-
Using
./centmin.sh
add virtual domain -
Update nginx config
In /usr/local/nginx/conf/conf.d/example.archielite.com.ssl.conf
-#try_files \$uri \$uri/ /index.php?q=\$uri&\$args;
+try_files $uri $uri/ /index.php?$query_string;
- Setup Let's Encrypt
/usr/local/src/centminmod/addons/acmetool.sh issue example.archielite.com lived
- Cloning source in to
/home/nginx/example.archielite.com
Using GitHub PAT (above) login, with any username.
sudo -u nginx git clone https://github.com/archielite/example.git
rm -rf example.archielite.com/public
cp -r example.archielite.com/* example
rm -rf example.archielite.com
mv example example.archielite.com
- Create database
CREATE USER example@'%' IDENTIFIED by 'secret';
CREATE DATABASE example;
GRANT ALL PRIVILEGES ON example.* TO example@'%' WITH GRANT OPTION;
FLUSH PRIVILEGES;
-
Update
.env
-
Run
sudo -u nginx composer install
sudi -u nginx php artisan migrate:fresh --seed
sudo -u nginx php artisan cms:license:activate --buyer=<license_name> --purchase_code=<license_code>