Table of Contents
Server
########################################
# CentOS Core 64Bit Plesk 12 #
########################################
Global Data
IP: 185.170.115.145
Host: v22017014219143544.hotsrv.de
Plesk Login Data
Login-URL: https://185.170.115.145:8443
Username: root
Password: password for "root"
Ajenti Login Data
Login-URL: https://185.170.115.145:8000
Username: root
Password: default password for root "admin"
-----------------
Your new root passwort is Xqkg4yArYzfmtH6
All login details written also to /root/logindetails.txt
---------------------------------------------------
Ajenti Configuration
root 1..2..
Fresh Setup
Add sudoer
thuydang 1..2..
SSH key authentication: The ~/.ssh/ directory should be mode 700 and the files contained therein should be mode 600.
Firewall
- disable firewalld
- Check, download: https://gist.github.com/thuydang/50a1fd02b49984faac15006f493f5f03, test with a VM!!
- Backup server / snapshot
- Apply firewall!!!
Python
Best Practice
- Install epel http://fedoraproject.org/wiki/EPEL
sudo yum install epel-release-latest-7.noarch.rpm sudo yum install epel-release sudo yum repolist sudo rpm -i *.rpm $ sudo yum --disablerepo="*" --enablerepo="epel" list available | less
- Install package with yum for stability (but old package)
- Install pip first then install single moudle with pip
- Use virtualenv when possible.
Check python paths
> import sys > print '\n'.join(sys.path) /usr/lib/python2.7 /usr/lib/python2.7/plat-x86_64-linux-gnu /usr/lib/python2.7/lib-tk /usr/lib/python2.7/lib-old /usr/lib/python2.7/lib-dynload /usr/local/lib/python2.7/dist-packages /usr/lib/python2.7/dist-packages
Or
python -c "import sys; print(':'.join(x for x in sys.path if x))"
https://leemendelowitz.github.io/blog/how-does-python-find-packages.html
Web control panel
ISPConfig
MariaDB
root 1sql2root
httpd apache
port 8090
Roundcube
Copy or download the following configuration and save it as config.inc.php within the /etc/roundcubemail/ directory of your Roundcube installation.
ISPconfig
admin 1sa..2nu..
port: 8080
DNS
1. whois vfoss.org to find name server
- find IP of the name server
ping name.server.com
3. whois the found ip to find provider
Now that everything is working as expected, we want server1.example.com and server2.example.com to be the “official” (=authoritative) name servers for mydomain.com. When you register a domain at your domain registrar, it automatically uses DNS servers of your domain registrar (unless you specify your own name servers) which means if other hosts try to resolve your domain, the DNS servers of your domain registrar will be queried instead of your ISPConfig DNS servers. To change that, go to your domain registrar's control panel, select your domain, and set your ISPConfig DNS servers as the authoritative name servers for the domain (this is a screenshot from the ResellerClub control panel; other domain registrars have similar control panels):
Ajenti
Base, Ajenti
- install epel
- yum install ajenti
Install py module with user# sudo pip…
The script here install latest ajenti using pip: http://docs.ajenti.org/en/latest/man/install.html
Using:
sudo yum clean all && sudo yum reinstall python-gevent-socketio
Error: psutil
Ajenti V for hosting
Ajenti V comes in form of small packages. Currently available packages include: ajenti-v (main package) ajenti-v-mail (Exim and Courier mail) ajenti-v-mysql (MySQL DB support) ajenti-v-php-fpm (PHP support via PHP-FPM) ajenti-v-ruby-unicorn (Rails support via Unicorn) ajenti-v-ruby-puma (Rails support via Puma) ajenti-v-ftp-pureftpd (FTP support via PureFTPd) ajenti-v-nginx (NGINX webserver support) ajenti-v-python-gunicorn (Python WSGI support via gunicorn) ajenti-v-nodejs (Node.js support)
If you have Apache or Postfix installed, but don't use it, remove it first:
yum remove httpd postfix
If you had Postfix or Sendmail installed and wish to use Ajenti V mail, kill the remaining postfix and sendmail processes. For Ajenti V Mail, SELinux interfers with Courier-authlib authentication, so consider disabling it:
setenforce 0
For example, to install basic LNMP package, run:
yum install ajenti-v ajenti-v-nginx ajenti-v-mysql ajenti-v-php-fpm php-mysql
service ajenti restart
Plesk not used bc license
Erste Schritte nach der Image-Installation
Sobald die Installation des vServers per VCP mit dem Image abgeschlossen ist, erhalten Sie eine Anzeige der Zugangsdaten welche sich wie folgt zusammensetzen.
URL zum Adminlogin im Format https://ip-des-servers:8443
Benutzername: Dies ist beim ersten Login root, nach der Ersteinrichtung admin
Passwort: Dies ist beim ersten Login gleich dem “root” Passwort und später das selbst gewählte (siehe unten)
Docker CentOS
Installation
Remove distro docker
sudo yum erase docker
Install yum
sudo yum install -y yum-utils sudo yum-config-manager \ --add-repo \ https://docs.docker.com/engine/installation/linux/repo_files/centos/docker.repo
Install docker latest version
sudo yum makecache fast sudo yum -y install docker-engine
Install specific docker version on production
yum list docker-engine.x86_64 --showduplicates |sort -r docker-engine.x86_64 1.13.0-1.el7 docker-main docker-engine.x86_64 1.12.5-1.el7 docker-main sudo yum -y install docker-engine-<VERSION_STRING>
Add user to docker group
sudo usermod -aG docker $(whoami)
Log out and log in from your server to activate your new groups.
sudo systemctl enable docker.service sudo systemctl start docker.service
Upgrade Docker
To upgrade Docker, first run sudo yum makecache fast, then follow the installation instructions, choosing the new version you want to install.
Uninstall the Docker package:
sudo yum -y remove docker-engine
Images, containers, volumes, or customized configuration files on your host are not automatically removed. To delete all images, containers, and volumes:
sudo rm -rf /var/lib/docker
Docker-compose
sudo pip install docker-compose sudo yum upgrade python*