I have a VPS and it has SSH access.
Is there some way that I can do command line on my VPS without having root access?
(I would like to start learning Linux command line!)
Rob
I am in the process of setting up my first VPS to host a website that I have been working on. By profession, I am a programmer, so I know nothing of Linux or web hosting!!
Thanks to lots of help on here this weekend, I finally learned how to access my VPS using SSH. (That only took a day or two to learn!) And my first command-line task was learning how to copy a file to another folder while maintaining the original modified date. (That only took another half-day!)
Whew!
So the next thing that I need to do is set up MySQL on my VPS...
My VPS runs on CentOS 6, and it also comes with cPanel, but since astrogeek and Miati were persistent in explaining why it is better to do things via the command-line versus using a GUI, I figured I would check things out...
My cPanel comes with some "wizard" that supposedly sets up a MySQL database for you, but whenever I see "wizard" I tend to run!
Advanced Support for my web host said that I should definitely use cPanel to create my database and create the users, because if I did it using phpMyAdmin it would supposedly mess things up as cPanel wouldn't recognize things?
(BTW, I requested MySQL Root access this morning, but I do not have Root access to my VPS - by choice for now!)
Questions:
1.) Should I listen to my web host and use the cPanel wizard to create a new MySQL database?
2.) If I decide to bypass cPanel, how exactly would I use my MacBook to talk to my VPS and do MySQL stuff over command-line?
FWIW, I developed my entire database using phpMyAdmin in MAMP on my MacBook. When I created my original database in development, I used phpMyAdmin's GUI. And then for everything else (e.g. create table, indexes, queries, etc.), I hand-wrote the SQL in TextEdit and then ran it in phpMyAdmin.
But I have no clue how to do any of this on my VPS!!
3.) How would I use the command-line to create a new database and set up groups and users for MySQL?
4.) If I did things by command-line, is it true that I would break cPanel?
I have been working on my website for the last 3 years, and it is ready to "go live", but I am discovering that setting up my VPS properly - and with lots of security - and getting things like PHP and MySQL set up is a very daunting task!!!
Sincerely,
Rob
Stupid question i know. I am trying to install some brother printer drivers and following the instructions it states that i must change to the directory where the file is stored by using the following command line "cd /home/(loginname)/downloads"
this comes back with unkown directory. When i use DIR the directory is there but it will not allow me to access it?
This has worked before. I have been using linux now for a few years and never had this problem before. It must be something stupid that I am doing.
Hi
First post, hope this is in the right forum.
When I plug a USB key into my PC it appears in dolphin but isn't mounted until I click on it.
Running df at the command line doesn't show the USB key until I've clicked it in dolphin then I can access it via the command line.
I'm trying to find a way to automatically mount the key when I boot up.
I found a script that scans /dev/disk/by-label and mounts any disks it finds in to the correct location. This works great from the command line.
I tried adding it to /etc/init.d/boot.local but on a reboot it failed as the USB disk hadn't been detected when boot.local ran.
So where do I need to put this script so it will run when the machine has booted and the USB key has been detected by the OS?
The PC is unattended so I need to be sure that if its remotely rebooted the script is run so the key is mounted.
Thanks
Hello--
I'm trying to locate a file or a command line in a file on my hard drive. I am running Ubuntu 12.05.4 linux. Is there a grep command that will search the whole tree from root down to all the sub-directories?
Thank You.
I am writing a pythong program which has command line executions for linux like ls and restart. I want to know how to pass the errors from the command executed to a file so that it becomes a log.
hi,
I am newbie in Linux shell scripting.Can anybody help me to check the presence of file identified by variable in Shell scripting?
For example: I am reading the content of a file using while command as below:
"while read -r line
do
code block
done < file_name"
Now in this case every line in file gets stored in the variable 'line' one by one.Problem here is every line in the file is nothing but the file_path of another file say xyz.txt and I am checking presence of this xyz.txt file using below command:
if [-f $line]
as 'line' is the variable which stores file path of xyz.txt but it is not working. It is unable to check the presence of this xyz.txt file as i am addressing it with the variable 'line'.
Please help me.Thanks in advance.
Hi,
I have been trying to get information on how to process the output of a tcl file (aodv and leach protocol using mannasim) which I got on my command line Iinterface. Actually, I don't even know the keywords to search as I am new to this and other minor attempts haven't yielded positive results., I know there is usually a trace file but I can't see any. All I see is on my command line.
I also observe that it took the space on the entire screen and I can't copy the output from the start ( I could only copy from node 19 out of 30 nodes) because of the huge number of output lines.
The last thing I havent been able to figure ou is whether temperature is equivalent to energy Iin mannasim as mannasim has only temperature and carbon dioxide?
Thanks
I am looping through a file and then want to run some commands. Below is my code.
cat $PATHNAME | while read line;
do
PATH=$line
ls -t $PATH/javacore* >$NDIR
diff -w $ODIR $NDIR > $CHGS
done
This is the error I get.
./java_snap_monitor.sh: line 13: ls: command not found
./java_snap_monitor.sh: line 14: diff: command not found
hello everyone.,
i am using linux Centos 6 machine, i have downloaded "back in time" through command line.
but i dont know how to install "back in time" from the command line.
i found some commands but that for UBUNTU and not running on Centos 6, giving error.
so , without GUI. can be possible to install and use it?????
thanks in advance..
Hello,
I am getting the follwoing error for Red Hat Enterprise Linux Server release 6.6
sudo su -
sudo: >>> /etc/sudoers: syntax error near line 118 <<<
sudo: parse error in /etc/sudoers near line 118
sudo: no valid sudoers sources found, quitting
sudo: unable to initialize policy plugin
cd /etc/sudoers.d/
-bash: cd: /etc/sudoers.d/: Permission denied
Could you help me to figure it out. As a root user am able to access but as normal user it is not allowing to sudo su - command.
vi /etc/sudoers.d/access
username ALL=(ALL) NOPASSWD: ALL
Please let me know if any additional formation required.