For some reason cPanel private keys are needing to be manually added for it to connect to github properly
1 |
ssh-add /home/your_user_name/.ssh/you_private_key_file |
For some reason cPanel private keys are needing to be manually added for it to connect to github properly
1 |
ssh-add /home/your_user_name/.ssh/you_private_key_file |
If you run into memory limit issues while trying to use composer, you can disable(or limit to a higher limit e.g. 1024M) with via the method below.
1 |
php -d memory_limit=-1 `which composer` require composer/modulename |
After you setup your centos droplet, you can do these steps. Make sure your hostname is a FQDN.
1. Change Root Password
1 |
passwd root |
2. Update Server
1 |
yum update |
3. Add user
1 2 3 4 5 6 |
adduser whmadmin passwd whmadmin usermod -aG wheel whmadmin mkdir /home/whmadmin/.ssh sudo cp -rf /root/.ssh/* /home/whmadmin/.ssh/ chown -R whmadmin:whmadmin /home/whmadmin/.ssh |
4. Modify SSH Settings
1 2 3 4 5 6 7 |
yum install nano nano -w /etc/ssh/sshd_config PermitRootLogin no PasswordAuthentication no Port 2222 systemctl reload sshd |
5. Disable SELinux
1 2 3 4 5 |
nano -w /etc/selinux/config SELINUX=disabled reboot sestatus |
6. Setup a SWAP file
1 2 3 4 5 6 7 8 9 |
sudo dd if=/dev/zero of=/swapfile count=4096 bs=1MiB sudo chmod 600 /swapfile sudo mkswap /swapfile sudo swapon /swapfile sudo sh -c 'echo "/swapfile none swap sw 0 0" >> /etc/fstab' #verify cat /etc/fstab #should look like /swapfile none swap sw 0 0 |
7. Install PERL
1 |
sudo yum install perl |
8. Install screen and wget
1 2 |
sudo yum install screen wget screen |
9. Install Cpanel
1 2 |
wget -N http://httpupdate.cpanel.net/latest sudo sh latest |
Once it is complete, you can access WHM from your hostname, or droplet IP on port 2087
1 |
rsync -chavzP -e "ssh -p customPort" user@ip.addresses:/home/user/remotedirectory /home/user/localdirectory |
1 2 |
mkdir empty_dir (create an empty directory) rsync -a --delete empty_sessions/ session/ |
1 |
find /directory -type f -name "sess_*" -delete |