This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Full VPS Setup on CentOS
Full VPS Setup on CentOS
This isn't as detailed as my Ubuntu Guide, but will you get you up and running with CentOS and will get you familiar with the OS and how it works.

To start with install CentOS 6/7. Once it's installed use this to login. Replacing "IP" with the server IP.

ssh -l root "IP"

then enter your password. To change the password run:


Next thing to do is install Sentora.

The script is pretty straightforward. Just make sure you pick Phoenix/Arizona/Mountain Standard Time so you don't have issues with daylight saving.

When it asks for "Enter the sub-domain you want to access Sentora panel"


Ideally the sub should be setup before you run the script, but can be done afterwards. The sub will be the address used to enter Sentora panel.

bash <(curl -L -Ss

Once the script finishes do not reboot (but make note of the passwords and save them).

Next run this:

yum install nano htop php-xcache xcache-admin

This will install XCache that will speed up page load times, htop an interactive process viewer and nano a text editor.

The next part is to edit the php.ini.

nano /etc/php.ini

Change these values to what you want them. If you are going to use phpMyAdmin to upload a database make sure upload_max_filesize is larger than your database:

post_max_size = 8M
upload_max_filesize = 2M
memory_limit = 64M

memory_limit should be about quarter of your total memory. So if your server has 1GB give it 256M, for 512M give it 128M.

F3 will save the file and Ctrl+X will exit nano.

Next we need to edit Apache.

nano /etc/httpd/conf/httpd.conf

Look for ServerName

And enter your web address. If it has # at the beging of it remove it.

Save the file and reboot Apache.

service httpd restart

Next modify MySQL so it doesn't use to much memory.

nano /etc/my.cnf

And add this just underneath [mysqld]

key_buffer_size = 16M
need to be higher. Higher number more Memory usage
sort_buffer_size = 1M
read_buffer_size = 1M
read_rnd_buffer_size = 2M
myisam_sort_buffer_size = 2M
join_buffer_size = 2M
max_connections = 60
you have issues with simultaneous connections increase this value
query_cache_type = 1
query_cache_size = 16M
need to be higher.
query_cache_limit = 8M
thread_stack = 128K
thread_cache_size = 16M
table_definition_cache = 400
table_open_cache = 2000
table_cache = 2000
max_heap_table_size = 16M
need to be higher
tmp_table_size = 16M
equal to max_heap_table_size
connect-timeout = 20
low_priority_updates = 1
concurrent_insert = ALWAYS

Then save the file and reboot MySQL.

To better tune MySQL look here:

service mysqld restart

To update/repair all the MySQL tables run:

mysqlcheck -o --all-databases --user=root --password=*MySQL Password*

Daily backups is broken in Sentora. Running it makes multiple backups filling up the disc very quickly.
To avoid having any issues with this remove all the backup modules.

rm -rf /etc/sentora/panel/modules/backup_admin/hooks/*

To manually backup your sites to a zip for easy transfer run:

zip -r /var/sentora/hostdata/zadmin/ /var/sentora/hostdata/zadmin/public_html

To setup a Cron job for a weekly backup run:

nano /etc/cron.weekly/backup

And add this to the file:

rm /var/sentora/hostdata/zadmin/
zip -r /var/sentora/hostdata/zadmin/ /var/sentora/hostdata/zadmin/public_html

F3 will save the file and Ctrl+X will exit nano.

Next set permissions and make it executable.

sudo chmod +x /etc/cron.weekly/backup
sudo chmod 755 /etc/cron.weekly/backup

You could also add your databases to the weekly backup by adding this to the backup cron:

mysqldump -u [username] –p[password with no space, so it will start with -p] [database_name] > /folder/to/save/[dump_file.sql]

For cron to work you will need to edit crontab.

To do this run:

nano /etc/crontab

# run-parts
01 * * * * root run-parts /etc/cron.hourly
15 4 * * * root run-parts /etc/cron.daily
30 8 * * 0 root run-parts /etc/cron.weekly
45 12 1 * * root run-parts /etc/cron.monthly

Crontab – Quick Reference

sudo chmod +x /etc/crontab
sudo chmod 755 /etc/crontab

service crond restart

chkconfig crond on

To setup the server to do automatic updates run:

yum -y install yum-cron

nano /etc/yum.conf

Add this to the file:

exclude=kernel* mysql*

This will pervent MySQL and the kernel from updating.

Next add your email to:

nano /etc/sysconfig/yum-cron

look for MAILTO=

Next start the service:

chkconfig yum-cron on
service yum-cron start

Lastly do some clean up

yum clean all

Now just reboot the server. Once rebooted log into sentora by entering the server IP into a web browser. You should of copied the login details earlier when the sentora script finished running.

To see if you are getting the speeds your VPS providers advertise run:

ethtool eth0 | grep -i speed

This will tell you what connection you have.

You can run these command to install Doing this isn't an accurate test. There's too many variables in play for it to be accurate. But it will give you a rough idea of what speeds you are getting.

wget -O
chmod a+rx
sudo mv /usr/local/bin/speedtest
sudo chown root:root /usr/local/bin/speedtest

To upgrade to PHP version 5.5 run:

rpm -Uvh

yum install yum-plugin-replace
yum replace php-common --replace-with=php55w-common

Doing this will break suhosin and XCache.

To repair run:

cd suhosin-master
make install
echo '' > /etc/php.d/suhosin.ini
echo 'suhosin.executor.include.whitelist = upload://' > /etc/php.d/suhosin.ini

tar xvfz xcache-3.1.0.tar.gz
cd xcache-3.1.0
./configure --enable-xcache
make install

Then add this to php.ini

nano /etc/php.ini

zend_extension = /usr/lib64/php/modules/
; Change xcache.size to tune the size of the opcode cache
xcache.size         = 24M
xcache.shm_scheme   = "mmap"
xcache.count        = 2
xcache.slots        = 8K
xcache.ttl          = 0
xcache.gc_interval  = 0

; Change xcache.var_size to adjust the size of variable cache
xcache.var_size     = 8M
xcache.var_count    = 1
xcache.var_slots    = 8K
xcache.var_ttl      = 0
xcache.var_maxttl   = 0
xcache.var_gc_interval =     300
xcache.test         = Off
xcache.readonly_protection = On
xcache.mmap_path    = "/tmp/xcache"
xcache.coredump_directory =   ""
xcache.cacher       = On
xcache.stat         = On
xcache.optimizer    = Off

xcache.coverager    = On
xcache.coveragedump_directory = ""

service httpd restart
Thanks given by: Ron-e
RE: Full VPS Setup on CentOS
CentOS 7 running MariaDB instead of MySQL on CentOS 6.
To my knowledge MariaDB is a drop-in replacement for MySQL, but i know that there are some differences.
So my question is, did you test this on MySQL and MariaDB both?

My Sentora DemoMy GithubAuxio Github
Zentora themeS-Type themeCstyleX theme

Sentora's development takes way too long, so i'm transitioning to HestiaCP.
Thanks given by:
RE: Full VPS Setup on CentOS
(11-08-2015, 04:47 AM)Ron-e Wrote: CentOS 7 running MariaDB instead of MySQL on CentOS 6.
To my knowledge MariaDB is a drop-in replacement for MySQL, but i know that there are some differences.
So my question is, did you test this on MySQL and MariaDB both?

I tested this on CentOS 6.4

But the settings (as I am aware) should be the same for MariaDB as it is for MySQL.
As you said MariaDB is a drop in replacement and it should use all the same settings/config files as MySQL.

MariaDB is similar in away to Sentora. Its a fork but all the commands and settings are the same as the former project.
Thanks given by:

Possibly Related Threads…
Thread Author Replies Views Last Post
Fail2ban for Sentora (Centos 7) bbspike 14 45 ,523 01-14-2020, 07:32 AM
Last Post: Vedran B
[How To] Update from PHP v5.4.16 to v5.6.31 (Includes suhosin patch) [CentOS] betatester3.0 5 17 ,362 03-18-2019, 01:23 AM
Last Post: BigBang
Ubuntu: How to setup TLS on postfix and dovecot Diablo925 28 109 ,162 02-15-2018, 08:46 PM
Last Post: duane

Forum Jump:

Users browsing this thread: 1 Guest(s)