sed -i 's/OLDDATABASENAME/NEWDBNAME/g' mysqldumpFile.sql
Then run:
mysql -p create NEWDBNAME; use NEWDBNAME; SOURCE /path/to/sql/fileNo need for a semicolon on the last line. Then check the success by:
show tables;
Websites and SEO
sed -i 's/OLDDATABASENAME/NEWDBNAME/g' mysqldumpFile.sql
Then run:
mysql -p create NEWDBNAME; use NEWDBNAME; SOURCE /path/to/sql/fileNo need for a semicolon on the last line. Then check the success by:
show tables;
<img src=”image.jpg” align=”center” />…to create this:
<figure> <img src=”image.jpg” align=”center”/> <figcaption><center>Caption goes here</center></figcaption> </figure>
apt-get update && apt-get upgrade -yFor the version of OS that currently gets installed with a fresh Binary Lane VPS we also need to update the base system. We like to use aptitude for that; while we’re installing aptitude, we might as well install the other thing that Aegir needs to install properly:
apt-get install curl sendmail aptitude -yUpgrade:
aptitude safe-upgrade -yNow, we need to install the database server. We use MariaDB.
apt-get install mariadb-server -yOne that’s done – you will be prompted to enter a root password for the database – we run the following command:
mysql_secure_installationDon’t worry about changing the root password now that you have already set one, but delete the test database when prompted, disable anonymous access and flush privileges. Now we can install Aegir, nginx, php5-fpm etc.:
echo “deb http://debian.aegirproject.org stable main” | sudo tee -a /etc/apt/sources.list.d/aegir-stable.listEnter the hostmaster URL – usually the fully qualified domain name. Enter the database root password once for provision and once for hostmaster. Assuming all of the above has gone well, you should be given a one-time-login link in your terminal at the end of the install process, e.g.:
curl http://debian.aegirproject.org/key.asc | sudo apt-key add –
apt-get update
apt-get install aegir3 aegir3-provision aegir3-hostmaster nginx php5-fpm
http://aegir.example.com.au/user/reset/1/1446598196/Nw4T4yd25IWEngCP2d2A_Ck3XslBiobnhbuNzXU4/loginNow, before using that run the following:
visudoAdd this to the end of the file:
Defaults:aegir !requirettyThis gives Aegir – the aegir user – permission to restart nginx without requiring a sudo password. Test this works by doing the following: su – aegir
aegir ALL=NOPASSWD: /etc/init.d/nginx
* Restarting nginx nginxThen:
[ OK ]
vim /etc/nginx/nginx.confComment out by putting a # in front of:
# tcp_nopush on;Reboot, and use the one-time-link. You should be logged in fine and now can use Aegir!
# types_hash_max_size 2048;
# error_log /var/log/nginx/error.log;
update-rc.d -f apache2 removeEasy done.
TASK ERROR: storage ‘proxmoxHDD’ does not existsAttempting to delete it from the command line using:
qm destroy [VM ID]…resulted in:
storage ‘proxmoxHDD’ does not existsFortunately, there’s a way around this. The KVM config files live in:
/etc/pve/qemu-serverMove or erase the [VM ID].conf file and when you refresh your web GUI the VM should be gone.
cat /proc/spl/kstat/zfs/arcstatsYou can gleam some really useful information out of how your RAM is being utilised and what your required ARC size might be from the results – this may be a topic for a future post, however!
If your system is vulnerable, you will see:env VAR='() { :;}; echo Shellshock vulnerable!' bash -c "echo Bash Testing"
Shellshock vulnerable! Bash testingIf it is not vulnerable, you will see:
bash: warning: VAR: ignoring function definition attempt bash: error importing function definition for `VAR’ Bash testingIf you are vulnerable, you can update bash by running the following:
sudo yum update bashOnce the update has finished, run the code to check your vulnerability again and it should be sorted.
env VAR='() { :;}; echo Shellshock vulnerable!‘ bash -c “echo Bash Testing”If your system is vulnerable, you will see:
Shellshock vulnerable! Bash testingIf it is not vulnerable, you will see:
bash: warning: VAR: ignoring function definition attempt bash: error importing function definition for `VAR’ Bash testingIf you are vulnerable, you can update bash by running the following:
sudo apt-get update && sudo apt-get install --only-upgrade
bash
Once the update has finished, run the code to check your vulnerability again and it should be sorted.
env VAR='() { :;}; echo Shellshock vulnerable!‘ bash -c “echo Bash Testing”If your system is vulnerable, you will see:
Shellshock vulnerable! Bash testingIf it is not vulnerable, you will see:
bash: warning: VAR: ignoring function definition attempt bash: error importing function definition for `VAR’ Bash testingIf you are vulnerable, you can update bash by running the following:
sudo apt-get update && sudo apt-get install --only-upgrade
bash
Once the update has finished, run the code to check your vulnerability again and it should be sorted. NOTE! Only the currently-supported versions of Ubuntu will get the bash update – if you are running anything older (e.g. 13.04, 13.10 or anything older that isn’t a still-supported LTS release) you will need to update your Ubuntu install to have the above work.