Re: [NethServer] CentOS to NethServer shell script request

314 views
Skip to first unread message

Alessio Fattorini

unread,
Jan 25, 2014, 2:16:10 PM1/25/14
to Gavin Engel, neths...@googlegroups.com
Hi Gavin,
first of all welcome to NethServer ML!
We don't have any automated script for this but could be a good idea! Can you started? We can help you, put the script somewhere like github.
Regards
Alessio

P.s. Can i ask where are you known about nethserver project?

Il 25/gen/2014 19:38 Gavin Engel <gavin...@gmail.com> ha scritto:
>
> I'd be interested in using a bash script to automate this process:
>
> http://www.nethserver.org/index.php?id=download_yum-installation
>
> I do realize there are only a few steps there.  Even so, if your team hosted an official conversion script at, say for example, nethserver.org/centos2neth.sh then I'd probably end up grabbing that to make sure I'm doing it the canonical way .  Plus I'm fairly lazy, so that is another reason.
>
> --
> You received this message because you are subscribed to the Google Groups "NethServer" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to nethserver+...@googlegroups.com.
> To post to this group, send an email to neths...@googlegroups.com.
> Visit this group at http://groups.google.com/group/nethserver.
> For more options, visit https://groups.google.com/groups/opt_out.

Giacomo Sanchietti

unread,
Jan 25, 2014, 3:11:48 PM1/25/14
to neths...@googlegroups.com
Hi,
you're absolutely right.

I'll look to create a simple script ready for use in the next few days.
By the way, with the next release the setup will be even easier.

Giacomo

Alessio Fattorini

unread,
Jan 25, 2014, 3:50:38 PM1/25/14
to Giacomo Sanchietti, neths...@googlegroups.com
Thanks Giacomo,
you are very kindly!
We should make this shift more easy and quick as it possible ;-)
Ciao,
Alessio

Gavin Engel

unread,
Jan 26, 2014, 6:00:22 PM1/26/14
to neths...@googlegroups.com, Giacomo Sanchietti
Hello all,

I discovered NethServer via a Tweet, I think a tweet from Alessio.  I am a web developer and do a lot of contract work.  My projects use CentOS far more than Debian/Ubuntu.  I'm very interested in a easy to setup/configure CentOS platform that can help me get stuff done faster.

On the topic of setup scripts, I'm pretty happy with the setup script that the VirtualMin team has put together for users.  I would point that out if you were looking for an example of what I mean:  http://www.virtualmin.com/download.html#gpl (script is actually located here: http://software.virtualmin.com/gpl/scripts/install.sh)

I'd love it the script were actually a github project, so that people like me could give feedback.  

By the way, you might also want to create an Amazon AMI for the EC2 service as a quick way to test Neth out.

-Gavin  

Alessio Fattorini

unread,
Jan 27, 2014, 6:10:58 AM1/27/14
to Gavin Engel, neths...@googlegroups.com, Giacomo Sanchietti
Il 27/01/2014 00:00, Gavin Engel ha scritto:
> Hello all,
>
> I discovered NethServer via a Tweet, I think a tweet from Alessio. I am
> a web developer and do a lot of contract work.

Uh, good to know :-) i'm very glad

> My projects use CentOS
> far more than Debian/Ubuntu. I'm very interested in a easy to
> setup/configure CentOS platform that can help me get stuff done faster.

We're thinking about a document which explain NethSever use like a LAMP
platform, for webmasters or developers like you. Do you have some notes
to share about your installation? We can work together on it

> On the topic of setup scripts, I'm pretty happy with the setup script
> that the VirtualMin team has put together for users. I would point that
..
> I'd love it the script were actually a github project, so that people
> like me could give feedback.

Giacomo is testing it, he's going to keep you updated!

> By the way, you might also want to create an Amazon AMI for the EC2
> service as a quick way to test Neth out.

It's not simple to maintain a NethServer AMI, we're think to a CentOS
AMI + script above. What do you think?

We will be at FOSDEM this week (www.fosdem.org), have you ever heard of
it? Have you thought to participate?
Ciao,
Alessio

--
Alessio Fattorini

Nethesis srl - Pesaro (Italy)

Giacomo Sanchietti

unread,
Jan 27, 2014, 9:55:57 AM1/27/14
to Gavin Engel, neths...@googlegroups.com
Hi,

I just created a simple install script for the 6.4 release:
http://www.nethserver.org/install_64.sh

How to use:

curl http://www.nethserver.org/install_64.sh -o install_64.sh
sh install_64.sh

For the next release the script will be available directly inside the
nethserver-release rpm and accessible via code.nethserver.org and github.

I also opened an issue with more details here:
http://dev.nethserver.org/issues/2636

Now we lack a quick start guide for a web developer, but we are planning
to create it.

Giacomo

Alessio Fattorini

unread,
Feb 11, 2014, 9:33:25 AM2/11/14
to neths...@googlegroups.com
Hi Gavin,
we have pushed your idea into the last beta3 release.

Il 2014-01-27 15:55 Giacomo Sanchietti ha scritto:

> I also opened an issue with more details here:
> http://dev.nethserver.org/issues/2636

Now you can simplify NethServer installation on a clean CentOS, with
this command:
yum localinstall -y
http://pulp.nethesis.it/nethserver/nethserver-release-6.5-1.ns6.noarch.rpm
nethserver-install

or this for install extra modules too:

yum localinstall -y
http://pulp.nethesis.it/nethserver/nethserver-release-6.5-1.ns6.noarch.rpm
nethserver-install nethserver-mail nethserver-nut

Try it and tell us your suggestions!
Regards

--
Alessio Fattorini

twitter.com/ale_fattorini

and...@andrew.org

unread,
Jan 21, 2015, 5:51:49 AM1/21/15
to neths...@googlegroups.com

Let me bump this topic by first introducing myself.
My name is Luca Andreucci, I am a long-time Linux enthusiast and system administrator, but new to nethserver. This is my very first message to this list.

I am trying to evaluate Nethserver starting from a Amazon EC2 instance built from a 64-bit Centos 6.5 Community AMI, namely:

  RightImage_CentOS_6.5_x64_v14.1.3_HVM_EBS
after adding the repo and running nethserver-install I am no longer able to connect to my instance via SSH, and that is the only option I have to interact with my VM in with EC2.
I'm not familiar with AWS/EC2 troubleshooting options yet, so I cannot say for sure what is happening, e.g. if the VM is hanging (though there's some hint this might be the case). I will possibly post more here (or wherever you point me as appropriate) if/as I find out more. All I know for now is that for some reason the SSH connection is no longer working and I can't do anything but destroy my instance and start back from scratch.
I'm wondering, for a start, is it possible that nethserver-openssh clashes with the previously installed SSH package? I can't see anything uninstalling from the nethserver-install output. I'm attaching it to this message, though I can't seem to find any other suggestion in it.

Meantime I keep on fiddling I'd be interested in knowing if someone has tried nethserver with EC2 before. A quick search into this group brought me to this topic, there does not seem to be anything else on the subject.

Thank you!
nethserver_EC2_FAIL.txt

Filippo Carletti

unread,
Jan 21, 2015, 12:12:56 PM1/21/15
to and...@andrew.org, neths...@googlegroups.com
> I'm wondering, for a start, is it possible that nethserver-openssh clashes
> with the previously installed SSH package?

I think the problem comes from the script that gathers system
configuration and insert it into the nethserver database.
While I setup a test environment on AWS, could you please send us some
config data before you try to install nethserver?

ls /sys/class/net
/sbin/ip route

Thank you.

--
Ciao,
Filippo

and...@andrew.org

unread,
Jan 22, 2015, 3:49:46 AM1/22/15
to neths...@googlegroups.com, and...@andrew.org

Thank you for your interest.

Here are some infos:

[root@ip-172-31-1-90 ~]# ll /sys/class/net/
total 0
lrwxrwxrwx 1 root root 0 Jan 22 08:33 eth0 -> ../../devices/vif-0/net/eth0
lrwxrwxrwx 1 root root 0 Jan 22 08:32 lo -> ../../devices/virtual/net/lo

[root@ip-172-31-1-90 ~]# /sbin/ip route
172.31.0.0/20 dev eth0  proto kernel  scope link  src 172.31.1.90
default via 172.31.0.1 dev eth0

[root@ip-172-31-1-90 ~]# ifconfig
eth0      Link encap:Ethernet  HWaddr 06:BD:D5:B7:9A:86 
          inet addr:172.31.1.90  Bcast:172.31.15.255  Mask:255.255.240.0
          UP BROADCAST RUNNING MULTICAST  MTU:9001  Metric:1
          RX packets:440 errors:0 dropped:0 overruns:0 frame:0
          TX packets:345 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:60976 (59.5 KiB)  TX bytes:51785 (50.5 KiB)
          Interrupt:165

As you can see, the instance sits on a private IP segment. Each instance has to be assigned to a Security Profile (sort of a firewall config) to define allowed inbound and outbound traffic.
My current profile allows SSH in (TCP/22) and everything outbound.

Filippo, I can easily give you root access to my newest instance if you don't want to mess with AWS right now.
(But setting up an account is actually a breeze and probably worth it anyway.)
Just ping me at my address and I'll send you the IP and a private key.

and...@andrew.org

unread,
Jan 23, 2015, 10:20:00 AM1/23/15
to neths...@googlegroups.com, and...@andrew.org

I'm pleased to say I finally succeeded in installing nethserver from CentOS 6.5 just by using a different starting image.
This is the image I had better luck with:

   AMI ID CentOS6.5 (ami-f82a1ce5)

I just logged into nethserver's webinterface. I will let you know more about my trial if there is interest.

The only thing I had to do is to set a password for the root user befor running nethserver-install. This image is set up to allow ssh pubkey login from a non-privileged user "ec2-user" that can sudo without a password, but after installing nethserver's packages, sudo was requesting a password.
Is it possible that nethserver's installation messed with sudo config? Anyway, setting the root pass before installation works just fine.

Ciao

Alessio Fattorini

unread,
Jan 23, 2015, 10:23:26 AM1/23/15
to neths...@googlegroups.com
On 23/01/2015 16:20, and...@andrew.org wrote:
>
> I'm pleased to say I finally succeeded in installing nethserver from
> CentOS 6.5 just by using a different starting image.

This a fantastic news! Welcome aboard Andrew and thanks for your
solution ;-)
See you around!

--
Alessio Fattorini - @ale_fattorini

Davide Principi

unread,
Jan 23, 2015, 10:37:42 AM1/23/15
to and...@andrew.org, neths...@googlegroups.com
Hi andrew,

On Fri, 2015-01-23 at 07:20 -0800, and...@andrew.org wrote:
> Is it possible that nethserver's installation messed with sudo config?
> Anyway, setting the root pass before installation works just fine.

I can confirm: NethServer overwrites /etc/sudoers configuration.

We could avoid wiping it out, by taking advantage of the "includedir"
directive in /etc/sudoers.

Could you post the original AMI /etc/sudoers file here?

Thank you





--
Davide Principi

#davidep | @davideprincipi | GPG 0x5651EA71


and...@andrew.org

unread,
Jan 23, 2015, 11:00:53 AM1/23/15
to neths...@googlegroups.com, and...@andrew.org


Il giorno venerdì 23 gennaio 2015 16:37:42 UTC+1, Davide Principi ha scritto:
Hi andrew,

On Fri, 2015-01-23 at 07:20 -0800, and...@andrew.org wrote:
> Is it possible that nethserver's installation messed with sudo config?
> Anyway, setting the root pass before installation works just fine.

I can confirm: NethServer overwrites /etc/sudoers configuration.

Yep. I just figured it out by myself looking at the new file's header info :)
 

We could avoid wiping it out, by taking advantage of the "includedir"
directive in /etc/sudoers.

Could you post the original AMI /etc/sudoers file here?

Well, it's a little late for that now, isn't it? ;)
But seriously, I could launch a new instance in minutes and look into it, and I'll be pleased to do it if you need further info, but I believe that you'll be just fine knowing the original conf includes "/etc/sudoers.d" - the dir is still there with its original contents untouched:

[root@ip-172-31-14-13 ~]# ll /etc/sudoers.d/
total 4
-r--r----- 1 root root 29 Dec 24  2013 cloud-init
[root@ip-172-31-14-13 ~]# cat /etc/sudoers.d/cloud-init
ec2-user ALL = NOPASSWD: ALL

Le me know if you want to know more.

Ciao

Davide Principi

unread,
Jan 23, 2015, 11:07:47 AM1/23/15
to and...@andrew.org, neths...@googlegroups.com
On Fri, 2015-01-23 at 08:00 -0800, and...@andrew.org wrote:
> Le me know if you want to know more.

That's enough to file a new enhancement!

http://dev.nethserver.org/issues/3012

and...@andrew.org

unread,
Jan 23, 2015, 11:57:13 AM1/23/15
to neths...@googlegroups.com
Just wondering,

out of curiosity I compared nethserver's sudoers with upstream 6.5 and they look pretty much the same, apart from the missing #includedir and the trailing stuff that looks like it's been generated (at least the numbered headers hint to that). If this is the case, I wonder why you'd bother changing sudoers rather than add your stuff to /etc/sudoers.d/ in the first place.

Bear with me :) I'm just getting my feeet wet. I'm sure there is a good reason but I felt like to ask.

PS: installing packages via web interface.... got some errors... will look into them

Ciao

sai krishna

unread,
Feb 19, 2015, 4:52:07 AM2/19/15
to neths...@googlegroups.com
Hi all,

I installed nethserver in Virtual box. I can able to use web interface but while installing packages it suddenly shows me error message ie.. 404 error nethserver gui

And while Installed in Physical machine. Centos is loaded with nethserver downloaded file. After yum localinstall pulp.nethserverinstall is successful and nethserver-install also successful. But the problem is after installing those I can't access webinterface also.

Can u please my problem at the nearest and do the needful..

Quick reply greatly appreciated.

Thanks


Filippo Carletti

unread,
Feb 19, 2015, 6:21:34 AM2/19/15
to sai krishna, neths...@googlegroups.com
Sai, could you please send more details of the error?
Could you login through ssh?
If yes, could you run this command and paste the output?
fuser -vn tcp 980
Have you installed the firewall package?
If yes, try to issue this command to temporarly disable it:
shorewall clear

Please, let me know.

sai krishna

unread,
Feb 19, 2015, 9:01:17 AM2/19/15
to Filippo Carletti, neths...@googlegroups.com
Hi Filippo,

Thanks for ur quick response.

Firstly I installed Nethserver on virtual box. I don't know how to use ssh. After installing in virtual box.
I logged in with https://192.168.1.28:980 IP. successfully login.and while installing packages after some time it's showing nethgui error 404. reload page or retry.
Then when we reload or retry the page it's redirecting to https://192.168.1.28:980/en/dashboard and no GUI.


While installing nethserver in physical machine and selected interactive or uninteractive installation. Centos is installing after that need to download nethserver respository and installing nethserver. Then it is showing u can access web interface. But it is not loading. I tried clearing cache all those things in browsers but things not gone fine.

For that problem I updated the os with 6.6 nethserver beta then web interface is working fine. But while installing packages it showing installed with some errors. and warnings.


Hope u understood and sorry for my bad english.

I am new to Linux and started my career now. Need more and clear guidance.

Thanks


--
Thanks and Regards
Saikrishna.V

sai krishna

unread,
Feb 19, 2015, 11:49:24 AM2/19/15
to Filippo Carletti, neths...@googlegroups.com
U can check attached file also.
For above mail about error.
1.jpg
2.jpg

Davide Principi

unread,
Feb 19, 2015, 12:12:20 PM2/19/15
to sai krishna, Filippo Carletti, neths...@googlegroups.com
On Thu, 2015-02-19 at 22:19 +0530, sai krishna wrote:
> U can check attached file also.
>

The attached screenshots seems to refer to a 6.5 installation: are you
sure the upgrade to 6.6 was successful?

Compare the output of

# rpm -qa | grep -F .ns6

..to the contents of

http://pulp.nethserver.org/nethserver/6.6/base/x86_64/Packages/

..or paste here the command output!

sai krishna

unread,
Feb 19, 2015, 11:54:30 PM2/19/15
to Davide Principi, Filippo Carletti, neths...@googlegroups.com
No

I got only some packages only which i have installed recently like lightsquid, etc.. only 25 packages available.

How to install all packages through command line. because while installing it through GUI it showing completed with some errors.

I successfully updated to 6.6 after updating only I get this web interface

Davide Principi

unread,
Feb 20, 2015, 3:39:11 AM2/20/15
to sai krishna, Filippo Carletti, neths...@googlegroups.com
On Fri, 2015-02-20 at 10:24 +0530, sai krishna wrote:

>
> How to install all packages through command line. because while
> installing it through GUI it showing completed with some errors.
>
>
> I successfully updated to 6.6 after updating only I get this web
> interface


1) make sure your nethserver-release package is 6.6 (by now, beta1)

yum localinstall http://pulp.nethserver.org/nethserver/nethserver-release-6.6.rpm

2) clean up yum cache

yum clean all

3) update existing packages

yum update

4) make sure all nethserver-iso group has been installed

yum install @nethserver-iso

sai krishna

unread,
Feb 20, 2015, 7:08:02 AM2/20/15
to Davide Principi, Filippo Carletti, neths...@googlegroups.com
Hi

As for above mail I did the same these are the outputs of respective installation or updates.


1. doesn't update nothing to do
2.cleaning up all list of fastest mirrors with in 1 sec completed
3.can't find a valid base url for repo : centos-base
4. warning : Group nethserver-iso doesn't have any packages
nothing to do

Filippo Carletti

unread,
Feb 20, 2015, 8:48:08 AM2/20/15
to sai krishna, Davide Principi, neths...@googlegroups.com
> 3.can't find a valid base url for repo : centos-base

Maybe you are behind a web proxy that filters some requests? Or could
it be that you have transient connectivity problems?


--
Ciao,
Filippo
Reply all
Reply to author
Forward
0 new messages