vps | LinuxHostSupport Linux Tutorials and Guides Mon, 29 Apr 2024 08:07:55 +0000 en-US hourly 1 https://wordpress.org/?v=6.6.1 How to install WordPress on a CentOS 7 VPS in less than 2 minutes https://linuxhostsupport.com/blog/how-to-install-wordpress-on-a-centos-7-vps-in-less-than-2-minutes/ https://linuxhostsupport.com/blog/how-to-install-wordpress-on-a-centos-7-vps-in-less-than-2-minutes/#respond Wed, 04 Oct 2017 13:17:34 +0000 https://linuxhostsupport.com/blog/?p=230 This tutorial will show you how to setup and install WordPress on your CentOS 7 VPS in less than 2 minutes. While WordPress is already easy to setup and install, we’re going to make this process even easier. We’ve put together a script containing some commands which will help you set up and install WordPress […]

The post How to install WordPress on a CentOS 7 VPS in less than 2 minutes appeared first on LinuxHostSupport.

]]>
This tutorial will show you how to setup and install WordPress on your CentOS 7 VPS in less than 2 minutes. While WordPress is already easy to setup and install, we’re going to make this process even easier. We’ve put together a script containing some commands which will help you set up and install WordPress on your CentOS 7 machine in no time.  Installing WordPress on a CentOS 7 VPS  is really an easy task and it can be done in less than 2 minutes.
All you have to do is to copy and paste the script into a file, execute it, and answer a few basic questions. But before we begin, you will need to have your MySQL ‘root’ password set. If not, please run:

mysql_secure_installation

Set your MySQL ‘root’ password before executing the script below. If for some reason you don’t remember your MySQL password, then you can easily reset your MySQL ‘root’ password as described here.

NOTE: Keep in mind that you need to have a domain name registered and pointing to your server’s IP address before installing WordPress, or else this script will not work.

This is the script, you will need to open up your favorite text editor, copy and paste this script into your editor, and save it with a name of your choice.

#!/bin/bash
#Install WordPress on a CentOS 7 VPS

#Set variables and create database

clear
echo -n "Enter your MySQL root password: "
read -s rootpass
echo ""
read -p "Database name: " dbname
read -p "Database username: " dbuser
read -p "Enter a password for user $dbuser: " userpass
mysql -uroot -p$rootpass <<MYSQL_SCRIPT
CREATE DATABASE $dbname CHARACTER SET utf8 COLLATE utf8_general_ci;
DELETE FROM mysql.user WHERE user='$dbuser' AND host = 'localhost';
FLUSH PRIVILEGES;
CREATE USER $dbuser@localhost;
GRANT ALL PRIVILEGES ON $dbname.* TO $dbuser@localhost IDENTIFIED BY '$userpass';
FLUSH PRIVILEGES;
MYSQL_SCRIPT
echo "Database created. Starting installation!"
sleep 2

#Download, install, and configuration of WordPress

read -p "Enter your server's public IP address: " address
read -r -p "Enter your WordPress URL [e.g. mydomain.com]: " wordurl
mkdir -p /var/www/html/$wordurl
cd /tmp/
wget -q http://wordpress.org/latest.tar.gz
tar -xzf latest.tar.gz -C /var/www/html/
rm -f /tmp/latest.tar.gz
mv /var/www/html/wordpress /var/www/html/$wordurl
cd /var/www/html/$wordurl
sed -e "s/database_name_here/"$dbname"/" -e "s/username_here/"$dbuser"/" -e "s/password_here/"$userpass"/" wp-config-sample.php > wp-config.php
chown apache: -R /var/www/html/$wordurl

#Create a Virtual Host

echo "

<VirtualHost $address:80>
 ServerName www.$wordurl
 DocumentRoot "/var/www/html/$wordurl"
 DirectoryIndex index.php
 Options FollowSymLinks
 ErrorLog logs/$wordurl-error_log
 CustomLog logs/$wordurl-access_log common
</VirtualHost>

" >> /etc/httpd/conf/httpd.conf

#Create .htaccess file

echo "

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress

" >> /var/www/html/$wordurl/.htaccess

systemctl restart httpd

echo "Continue your installation at http://www.$wordurl/wp-admin/install.php"

#End of script

Once you have saved this file, now you will need to make this executable by running this command:

chmod +x <name of your file>

Now that you have made your file executable, you can now execute your script and install WordPress:

./<name of your file>

The script will then ask you for information to create a MySQL database for your WordPress installation, after which it then downloads, installs, and configures your installation to work with your database. Finally, it creates a virtual host with which your WordPress installation will be served to a web browser. Altogether, this should take no more than a few minutes to set up and run.

Now that you have successfully installed WordPress on your server, the last thing you’ll need to do is to navigate to http://<yourwebsitehere>.com/wp-admin/install.php and finish configuring your WordPress installation.

Of course, you don’t have to do any of this if you use one of our Linux Host Support services, in which case you can simply ask our expert Linux admins to install this for you. They are available 24×7 and will take care of your request immediately.

PS. If you liked this post, please share it with your friends on the social networks using the buttons below, or simply leave a comment. Thanks.

The post How to install WordPress on a CentOS 7 VPS in less than 2 minutes appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-wordpress-on-a-centos-7-vps-in-less-than-2-minutes/feed/ 0
How to Migrate Odoo from one Server to Another https://linuxhostsupport.com/blog/how-to-migrate-odoo-from-one-server-to-another/ https://linuxhostsupport.com/blog/how-to-migrate-odoo-from-one-server-to-another/#comments Wed, 27 Sep 2017 08:54:11 +0000 https://linuxhostsupport.com/blog/?p=225 In this tutorial, we will show you how to completely migrate your Odoo installation, from one server to another. In this tutorial, an Ubuntu 16.04 server is used as both source and destination server. The migration is also possible between different Linux distributions. If this is the case, you can use one of our Linux […]

The post How to Migrate Odoo from one Server to Another appeared first on LinuxHostSupport.

]]>
In this tutorial, we will show you how to completely migrate your Odoo installation, from one server to another. In this tutorial, an Ubuntu 16.04 server is used as both source and destination server. The migration is also possible between different Linux distributions. If this is the case, you can use one of our Linux Host Support Services, and simply ask our expert Linux admins to do the migration for you.

Requirements:

  • SSH access on both, the source and destination server is required
  • Python, PostgreSQL and any additional dependencies like wkhtmltopdf, should already be installed on the destination server before initiating the transfer

 

1. Creating a backup on the source server

First, we will need a backup of your PostgreSQL database on your source server.

Log in via SSH as the odoo user on your server:

su odoo_user

Now, navigate to your Odoo directory:

cd /path/to/odoo

You can list the databases you have stored with the following command:

psql -l

You can export your odoo database by using the pg_dump command:

pg_dump dbname > db_backup.sql

Where “db_name” is the name of the database you need to export and “db_backup.sql” will be the name of the exported database.

Alternatively, if you don’t want to export your database through the command line interface, you can use some web-based GUI administration tools like phpPgAdmin or Adminer.

You can also export your database through your Odoo Database Manager directly from your browser by opening the following URL:

http://your-odoo-domain/web/database/manager

where “your-odoo-domain” is the name of your actual domain or your server IP address.

You also need to copy your odoo init and configuration file to the current directory.  For example:

cp /etc/init.d/odoo-server .
cp /etc/odoo-server.conf .

You can also open the odoo-server.conf file and check for any alternative custom addons location outside the odoo root directory. If there is, you should copy these addons as well to our current directory:

cp /path/to/odoo/addons .

Now, that we have everything we need in one place (make sure again that you are inside your Odoo directory on your server), we can create an archive of all these files with the following command:

tar -czf odoo_backup.tgz *

2. Transfer the backup

Before you transfer the backup we have made, first, you must log to your destination server and create a new user there:

adduser odoo_user

Now you can copy the backup archive from your source server to the destination with the rsync command (execute this command on the source server):

rsync -avz --progress -e "ssh -p 22" odoo_backup.tgz odoo_user@destination-ip-address:/home/odoo-user/

If SSH listens on a different port on the destination server, change the ssh port number accordingly.

You can extract the archive with the following command:

tar -zxf odoo_backup.tgz

You also need to copy your odoo-server.conf  and init file to the appropriate location;

cp odoo-server.conf /etc/
cp odoo-server /etc/init.d/

Depending on where you have placed your odoo directory, you will need to change the path to your addons directory accordingly inside the odoo-server.conf file:

nano /etc/odoo-server.conf

and edit the path for the addons_path if necessary.

Switch back to user root, and create the appropriate log file at the location specified in the configuration file. For example:

touch /var/log/odoo-server.log

3. Restoring the Database

To restore the database, create a new postgresql user with the following commands:

su postgres
createuser odoo_user

Create an empty database by executing:

createdb odoo_db

Give a password to the user:

psql
psql=# alter user odoo_user with encrypted password 'strong-password';

And grant all privileges on the database with:

grant all privileges on database odoo_db to odoo_user ;

Now, you can import your database from the source server into the newly created empty database by executing the following command:

psql odoo_db < /path/to/db_backup.sql

Again, you can use the alternative tools we have mentioned before to do this, or you can directly export it from your browser using the Odoo Database Manager.

You should also assign your odoo_user as the owner of all the files in your current odoo directory:

chown -R odoo_user: /path/to/your/odoo/directory

With this, the migration of your Odoo should be completed.

 

4. Start your Odoo Server

You can now start your Odoo on the new server with the following command:

service odoo-server start

You can also try to open your Odoo inside your browser and test if everything is working properly. Congratulations!

 

If you are one of our Linux Host Support customers, you don’t have to do any of this, simply ask our admins, sit back and relax. Our admins will migrate your Odoo from one server to another for you immediately.

PS. If you liked this post please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.

The post How to Migrate Odoo from one Server to Another appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-migrate-odoo-from-one-server-to-another/feed/ 7
Install Sentora on Ubuntu https://linuxhostsupport.com/blog/install-sentora-on-an-ubuntu-vps/ https://linuxhostsupport.com/blog/install-sentora-on-an-ubuntu-vps/#respond Wed, 13 Sep 2017 16:02:15 +0000 https://linuxhostsupport.com/blog/?p=213 We’ll show you, how to install Sentora on Ubuntu. Sentora is completely free web hosting control panel for Linux, UNIX and BSD based servers written in PHP. It is fully featured and easy to use hosting control panel that can help users to manage their servers with ease through the user interface. Its installation is […]

The post Install Sentora on Ubuntu appeared first on LinuxHostSupport.

]]>
We’ll show you, how to install Sentora on Ubuntu. Sentora is completely free web hosting control panel for Linux, UNIX and BSD based servers written in PHP. It is fully featured and easy to use hosting control panel that can help users to manage their servers with ease through the user interface. Its installation is pretty easy and fast and includes all the software you will need to manage multiple websites and clients on a single server. In this tutorial we will guide you through the steps of installing Sentora control panel on Ubuntu.

Sentora comes with the following services installed out of the box:

  • Apache HTTPd
  • PHP
  • MySQL/MariaDB
  • ProFTPd
  • Postfix
  • Dovecot

It comes with a lot of handy features such as:

  • Quota management
  • Multi-client environment
  • Custom Themes
  • API integration
  • Language translation packs
    and many more…

1. Login to your server via SSH

Login to your Ubuntu server via SSH as user root

ssh root@IP_Address -p Port_Number

2. Update the installed packages

and make sure that all installed packages are updated by running the following command

apt-get update && apt-get upgrade

3. Download Sentora installation script

Download the Sentora installation script to your server

wget http://sentora.org/install

4. Make the script executable

Once downloaded, make the script executable

chmod +x install

4. Run the script

and run the script to start Sentora’s installation

./install

Please note that there can be no other services such as Apache, Nginx, MySQL, PHP, FTP and mail server, etc… installed on your Ubuntu VPS prior to installing Sentora. If you already have some of these service installed, you will have to remove them in order to start the Sentora installation.

In our case, MySQL server is already installed on the VPS:

Welcome to the Official Sentora Installer 1.0.3  #
##################################################

Checking that minimal requirements are ok
Detected : Ubuntu  14.04  x86_64
Ok.
It appears that package mysql-server is already installed. This installer
is designed to install and configure Sentora on a clean OS installation only!

Please re-install your OS before attempting to install using this script.

5. Remove MySQL

So we have to remove it

apt-get remove mysql-server
apt-get purge mysql-server

6. Execute the installation script again

and execute the installation script again to start up the installer

./install

You will be prompted to select your geographic area and then the city or region the server timezone should be set in. After that you will have to enter your domain and IP address to access your control panel. You should use a subdomain to access the control panel, for example: sentora.yourdomain.com

After everything is successfully installed, you will get the following output:

########################################################
Congratulations Sentora has now been installed on your
server. Please review the log file left in /root/ for
any errors encountered during installation.

Login to Sentora at http://http://sentora.yourdomain.com
Sentora Username  : admin
Sentora Password  : YOURPASSWORD

MySQL Root Password      : ROOTPASSWORD
MySQL Postfix Password   : POSTFIXPASSWORD
MySQL ProFTPd Password   : PROFTPDPASSWORD
MySQL Roundcube Password : ROUNDCUBEPASSWORD
(theses passwords are saved in /root/passwords.txt)
########################################################

7. Access Sentora control panel via web browser

Once the installation is completed, open you favorite web browser and point it to http://sentora.yourdomain.com to access Sentora control panel.

For more information on how to install, configure and use Sentora control panel, please visit the official documentation.


Of course you don’t have to Install Sentora on an Ubuntu, if you use one of our Linux Host Support services, in which case you can simply ask our expert Linux admins to install Sentora on your Ubuntu server for you. They are available 24×7 and will take care of your request immediately.

PS. If you liked this post, on how to Install Sentora on an Ubuntu, please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.

The post Install Sentora on Ubuntu appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/install-sentora-on-an-ubuntu-vps/feed/ 0
How to backup a WordPress site on your VPS https://linuxhostsupport.com/blog/how-to-backup-a-wordpress-site-on-your-vps/ https://linuxhostsupport.com/blog/how-to-backup-a-wordpress-site-on-your-vps/#comments Fri, 01 Sep 2017 09:19:16 +0000 https://linuxhostsupport.com/blog/?p=195 In this tutorial, we will show you how to manually backup your WordPress site on your VPS. It is highly recommended that you make regular backups of your WordPress site so you can easily restore it if something unexpected happens, for example, if your site breaks because of a faulty plugin, it gets infected with […]

The post How to backup a WordPress site on your VPS appeared first on LinuxHostSupport.

]]>
In this tutorial, we will show you how to manually backup your WordPress site on your VPS. It is highly recommended that you make regular backups of your WordPress site so you can easily restore it if something unexpected happens, for example, if your site breaks because of a faulty plugin, it gets infected with malicious files, you accidentally delete the contents of our database and so on. In order to fully make a backup of your WordPress site, we will need to make a backup of your WordPress files and your WordPress database.

WordPress Files

First, we will make a backup of all of your WordPress site files.

To do so, you need to log in to your VPS via SSH.

Once logged in, you will need to navigate to your WordPress root directory. Depending on your server configuration this can be at a different location, for example, /var/www/html/wordpress/.

Your WordPress site consists of the following:

  • the WordPress core installation files (stored in the wp-admin directory).
  • the WordPress Themes and Plugins (stored in the wp-content directory).
  • libraries and third-party components (stored in the wp-includes directory).
  • Images and Files
  • JavaScript and PHP scripts
  • Additional files and static web pages

All of these together will generate your WordPress site, so it would be best to backup all of these files and directories.

It is usually enough to only copy your wp-content directory, as the contents of wp-admin and wp-includes are usually never modified, and you can always retrieve them from the original WordPress installer.

But, just so you can have a full working copy of our site, it would be a good idea to make a backup of all the WordPress files together.

So, if your WordPress root directory is located in /var/www/html/wordpress/, you can do this with the following command:

tar -cpzf wp-backup.tar.gz /var/www/html/wordpress/

This will create an archive file of all the WordPress files which generate your website.

WordPress Database

Your WordPress files alone are not enough if we want a complete backup of your website. All the information of your website, including your posts, comments, site configurations, user accounts and so on, is stored in your database.

You can make a full backup of your WordPress database with the following command:

mysqldump -u wp_user -p wp_database > wp_database_backup.sql

where “wp_user” is the name of the user of your WordPress database, and “wp_database” is the name of your database.

If you are not sure of the user, database name and password, you can find that information in the wp-config.php file inside your WordPress directory.

With this, you now have everything you need to successfully restore your WordPress site.

After you have successfully made a backup of both your WordPress files and database you can easily transfer them to your local computer via FTP or the other way around when you need to restore your website.

 

Of course, if you are one of our Linux Host Support customers, you don’t have to do any of this, simply ask our admins, sit back and relax. Our admins will make a backup of your WordPress site for you immediately.

PS. If you liked this post, on How to install Monica on Ubuntu 16.04, please share it with your friends on the social networks using the buttons below or simply leave a comment in the comments section. Thanks.

The post How to backup a WordPress site on your VPS appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-backup-a-wordpress-site-on-your-vps/feed/ 3
Install OpenLiteSpeed on Ubuntu 16.04 https://linuxhostsupport.com/blog/install-openlitespeed-on-ubuntu-16-04/ https://linuxhostsupport.com/blog/install-openlitespeed-on-ubuntu-16-04/#comments Wed, 23 Aug 2017 08:51:32 +0000 https://linuxhostsupport.com/blog/?p=184 Today we will show you, how to install and configure OpenLiteSpeed on your Ubuntu 16.04 VPS. OpenLiteSpeed is a lightweight, open source HTTP server developed and copyrighted by LiteSpeed Technologies, Inc. It provides a user friendly web interface and supports various operating systems, including Linux, Mac OS, SunOS and FreeBSD. It is fairly easy to […]

The post Install OpenLiteSpeed on Ubuntu 16.04 appeared first on LinuxHostSupport.

]]>
Today we will show you, how to install and configure OpenLiteSpeed on your Ubuntu 16.04 VPS. OpenLiteSpeed is a lightweight, open source HTTP server developed and copyrighted by LiteSpeed Technologies, Inc. It provides a user friendly web interface and supports various operating systems, including Linux, Mac OS, SunOS and FreeBSD. It is fairly easy to install OpenLiteSpeed on an Ubuntu 16.04 VPS. The installation process should take about 10-15 minutes, if you follow the very easy steps described below.

INSTRUCTIONS:

First of all login to your Ubuntu 16.04 VPS via SSH as user root

ssh root@IP_address

At the very beginning, it is best to start a screen session by executing the following command

screen -U -S openlitespeed

Update the system:

apt-get update && apt-get -y upgrade

Make sure to always keep your server up to date.

Install necessary packages:

apt-get install build-essential libexpat1-dev libgeoip-dev libpcre3-dev zlib1g-dev libssl-dev libxml2-dev rcs libpng-dev

Download and extract the latest stable version of OpenLiteSpeed on your server. At the time of this writing, the latest stable version of OpenLiteSpeed is 1.4.26.

cd /opt && wget http://open.litespeedtech.com/packages/openlitespeed-1.4.26.tgz
tar -xvzf openlitespeed-1.4.24.tgz
cd openlitespeed-1.4.24

Then use the following command to configure the software and to compile it, This will install the entire OpenLiteSpeed system under the /usr/local/lsws location:

./configure
make
make install

Install MariaDB

To install MariaDB, run the following command:

apt-get install -y mariadb-server

When the installation is complete, run the following command to secure your installation:

mysql_secure_installation

Configure it like this:

Enter current password for root (enter for none): Enter
Set root password? [Y/n]: Y
New password: 
Re-enter new password: 
Remove anonymous users? [Y/n]: Y
Disallow root login remotely? [Y/n]: Y
Remove test database and access to it? [Y/n]: Y
Reload privilege tables now? [Y/n]: Y

Configure an administrative username and password for the OpenLiteSpeed’s web interface by running the following command:

/usr/local/lsws/admin/misc/admpass.sh

You will be asked to provide a username for the administrative user. If you just press ENTER, the username “admin” will be selected. Afterwards, you will be asked to select and confirm a new password for the account.

After setting up the username and the password use the following command to start the web server:

/etc/init.d/lsws start

Access OpenLiteSpeed

OpenLiteSpeed will be available on HTTP port 8080 by default and admin login using port 7080. Open your web browser and navigate to http://1your-domain-name.com:8080, you will see the default OpenLiteSpeed web page.

You can also access the administrative interface by navigating to http://your-domain-name.com:7080 on your web browser. You will be asked to enter the administrative username and password. After successful authentication, you will be redirected to the admin area.

That is it. The OpenLiteSpeed installation is now complete.

Of course you don’t have to do any of this if you use one of our Server Management Services, in which case you can simply ask our expert Linux admins to install OpenLiteSpeed for you. They are available 24×7 and will take care of your request immediately.

PS. If you liked this post please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.

The post Install OpenLiteSpeed on Ubuntu 16.04 appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/install-openlitespeed-on-ubuntu-16-04/feed/ 1