Quick way not very detailed but it gives you a clue
$ last
nJoy ! 🙂
(I get shorter and sweeter 🙂 )
Quick way not very detailed but it gives you a clue
$ last
nJoy ! 🙂
(I get shorter and sweeter 🙂 )
i.e. You wnet home need your desktop have ssh no vnc !! Here is the easy solution..
Install x11vnc.
$ DISPLAY=localhost:0 x11vnc &
connect to the display using vnc et voila !
BTW Teamviewer also USED TO WORK but no longer in ver 8 so thanks VNC for not being obsolete..
nJoy 🙂
If let’s say Mysql is slow at performing a task you can check what is the bottleneck using strace to attach to the process.
<span style="color: #00ff00;">$ ps -ef|grep -i mysql</span>
Identify the process id then
<span style="color: #00ff00;">$ strace -cp <pid></span>
Leave it 10 seconds or a minute then ^C. That will tell you where the process is spending its time, e.g. it could just be waiting for the disk if you seen read and write dominate.
Njoy 🙂
So you remote deskptop rebooted and teamviewer did not run on startup as it does not do in Linux for some strange reason:
Connect with ssh ( putty)
Then run
DISPLAY=`localhost`:0 teamviewer&
Njoy 🙂 !
Virtual machines and NTP do not go easily well together. Machines paused for extended periods tend to loose the ntp sync since the difference grows too much.
Also from VMware Docs the following info might be clarificatory:
And :
In ESX, the ESX NTP daemon runs in the service console. Because the service console is partially virtualized, with the VMkernel in direct control of the hardware, NTP running on the service console provides less precise time than in configurations where it runs directly on a host operating system. Therefore, if you are using native synchronization software in your virtual machines, it is somewhat preferable to synchronize them over the network from an NTP server that is running directly on its host kernel, not to the NTP server in the service console. In ESXi, there is no service console and the NTP daemon runs directly on the VMkernel, so it works well as a NTP server for virtual machines.
Quoted from :Â http://www.vmware.com/files/pdf/techpaper/Timekeeping-In-VirtualMachines.pdf
Easy way (And I think best solution is)
To force a sync run hwclock command.
nJoy 🙂 !
This article explains how to connect to a ssh server located on the internet from a local network protected by a firewall through a HTTPS proxy.
Requirement are :
The ssh daemon need to listen on 443 port. To accomplish this, just edit this file (on debian system) /etc/ssh/sshd_config and add this line :
Port 443
Then restart the daemon :
sudo /etc/init.d/ssh restart
I suppose you are on a Linux system (debian for example). First you have to compile the connect binary which will help your ssh client to use proxies (HTTPS in our case). Then you have to configure your ssh client to tell him to use HTTPS proxy when he tries to connect to your ssh server.
connect software :connect-proxy package :
sudo apt-get install connect-proxy
cd /tmp/ wget http://www.meadowy.org/~gotoh/ssh/connect.c gcc connect.c -o connect sudo cp connect /usr/local/bin/ ; chmod +x /usr/local/bin/connect
~/.ssh/config file and add these lines :
## Outside of the firewall, with HTTPS proxy Host my-ssh-server-host.net ProxyCommand connect -H proxy.free.fr:3128 %h 443 ## Inside the firewall (do not use proxy) Host * ProxyCommand connect %h %p
ssh my-ssh-server-host.net
For example to connect to in ssh github.com :
Host github.com ProxyCommand=ssh my-ssh-server-host.net "/bin/nc -w1 %h %p"
Here are the steps of what you need to do in order to install and setup MySQL on a new server.
We’ll prepare a fresh CentOS 6 system (64 bit) for use as a database server. All you need is access to an SSH client and your server root credentials.
The first thing I’d like to do is make sure I have all available updates. So once I log in I run
yum update
This can take some time so grab a coffee while you wait. Once yum has finished, let’s check if MySQL is already installed on your system:
mysql
If you get “command not found” then you know you need to install MySQL.
MySQL consists of two parts: the client and the server. In order for our system to run the daemon which will process external requests we need both on our system. Here’s how we get those:
yum install mysql mysql-server
This will take a minute or two. No need to restart your server, all you need to to is start MySQL with
service mysql start
and it will be available for use. You’ll see the following message:
To start mysqld at boot time you have to copy support-files/mysql.server to the right place for your system PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER ! To do so, start the server, then issue the following commands: /usr/bin/mysqladmin -u root password 'new-password' /usr/bin/mysqladmin -u root -h yourdomain.com password 'new-password' Alternatively you can run: /usr/bin/mysql_secure_installation which will also give you the option of removing the test databases and anonymous user created by default. This is strongly recommended for production servers. See the manual for more instructions. You can start the MySQL daemon with: cd /usr ; /usr/bin/mysqld_safe & You can test the MySQL daemon with mysql-test-run.pl cd /usr/mysql-test ; perl mysql-test-run.pl Please report any problems with the /usr/bin/mysqlbug script!
Looks like we need to do two things: set a root password and secure the installation. You can do these steps manually, but MySQL is rather nice in that it provides a script which you can use to secure your installation. Note that this path may be different on your system:
/usr/bin/mysql_secure_installation
The script will ask you the following questions:
Now you can access MySQL with the following command:
mysql -p
You will likely need to make sure MySQL is running when you reboot the server, it’s cumbersome to start it manually every time you do that. This will take care of it:
chkconfig --levels 235 mysqld on
We’re done – MySQL is now running on your server and yours to populate.
Have fun ![]()
When installing php PECLÂ On CentOS/RHEL (+cPanel) installations, if you get a “checking whether the C compiler works… configure: error: cannot run C compiled programs”, you may need to remount the /tmp and /var/tmp with exec permissions first:
$ mount -o remount,exec,suid /tmp
$ mount -o remount,exec,suid /var/tmp
Then:
$ pecl install {package}
And, don’t forget to remount them as noexec after.
Run updatedb first. You can run it manually from the command line.
updatedb
It should have scheduled itself as a cron job when you installed slocate. If you just installed slocate, it will not have run yet. Otherwise, make sure you have a cron daemon running and that there is an updatedb task scheduled. Also, make sure your computer is on when it it is scheduled
If this is a VM and does not run continuously especially never spent days on this will happen. Just in case check the cron job found here:
The cron job is found here:
/etc/cron.daily/mlocate.cron
Thats’ pretty much it.