wiki:prodserver
This is an old revision of the document!
Table of Contents
Beacon Production Server
Beacon production is where the public visits beacontechnology.com
The hostname is also cpanel.beacontechnology.com
Links
Setup
To create a new cpanel.beacontechnology.com server follow these steps:
- Set up a fresh CentOS 7 minimal.
- yum install -y screen
- run
screen - Inside screen, update the server with:
yum update -y; sync; sleep 1; reboot - Make sure the box has a valid hostname like cpanel.beacontechnology.com Run
hostnameto print the hostname. To change the hostname run:nmcli general hostname cpanel.beacontechnology.com - Disable NetworkManager by following this guide: Click Here
- Install cPanel by following this guide: Click Here
- Transfer the .tar.gz file somewhere to the box
- Go to this article to see your restore options
- Update DNS if you have a different IP
Additional Setup
There are some other things to take into consideration.
The website generates tons of session files and never cleans them up.
To fix this, you can use a cron job to clean them up
# cat /etc/cron.daily/clean_sessions.sh #!/bin/bash find /home/beacontechnology/public_html/session -type f -mtime 5 -delete
The above has been implemented in a cron job owned by root that runs twice daily. It removes sessions after 10 days. Using -delete would fail due to the large number of arguments (too many files). Piping the results to rm did the job.
/home/beacontechnology/clean_sessions find /home/beacontechnology/www/session/ -name '*' -type f -mtime +10 | head -10000 | xargs rm find /home/beaconmicro/www/session/ -name '*' -type f -mtime +10 | head -10000 | xargs rm
wiki/prodserver.1628113457.txt.gz · Last modified: 2021/08/04 21:44 by guidebeacon