Type the following commands as root:
cp /etc/localtime /root/old.timezone
ln -s /usr/share/zoneinfo/America/Chicago /etc/localtime
Verify new settings by typing the following two commands:
ls -l /etc/localtime
Thats it :)...
How can I find and replace specific words in a text file using command line?
sed -i 's/original/new/g' file.txt
sed = Stream EDitor
-i = in-place (i.e. save back to the original file)
The command string:
s = the substitute command
original = a regular expression describing the word to replace (or just the word itself)
new = the text to replace it with
g = global (i.e. replace all and not just the first occurrence)
file.txt = the file name
Or to make replace on all files on folder
sed -i 's/foo/bar/g' *...
In the cases where more restrictions may be required, there are ways to create users with custom permissions.
Let’s start by making a new user within the MySQL shell:
CREATE USER 'nikesh'@'localhost' IDENTIFIED BY 'password';
Sadly, at this point newuser has no permissions to do anything with the databases. In fact, if newuser even tries to login (with the password, password), they will not be able to reach the MySQL shell.
Therefore, the first thing to do is to create new database and provide the user with access to that database.
create database nikeshdb;
GRANT ALL PRIVILEGES ON nikeshdb.* TO 'nikeshshk'@'localhost';
The asterisks in this command refer to table that they can access—this specific command allows to the user to read, edit, execute and perform all tasks across all the databases and tables.
Once you have finalized the permissions that you want...
sudo a2enmod ssl
Create new directory for the self signed certificate
sudo mkdir /etc/apache2/ssl
Create the self signed certificate and the server key that protects it, and placing both of them into the new directory
sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/apache2/ssl/owncloud.key -out /etc/apache2/ssl/owncloud.crt
Now we setup the certificate
sudo nano /etc/apache2/sites-available/default-ssl.conf
The lines that need changing are the following
Activate the new vhost
sudo a2ensite default-ssl
sudo service apache2 restart...